<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // lodash  JSON.parse(JSON.stringify(obj))
    // 对象
    /* var obj = {
      a: 10,
      b: 20,
      c: 30
    }
    // 展开运算符 ...
    var obj2 = {
      ...obj
    }
    obj.a = 100;
    console.log(obj2); */
  


  /*   var arr = [1,2,3,4];
    var arr2 = [...arr]; */

      // es6 Object.assign
      var obj1 ={
        a: 10
      }
      var obj2 = Object.assign({}, obj1);
  </script>
</body>
</html>